package com.zx.controller.comment;

import com.zx.dto.request.goods.GoodsRequestDto;
import com.zx.dto.response.comment.CommentDao;
import com.zx.service.comment.CommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @author sunkai
 * @date 2022/8/2 0002 22:08
 * @mood zhou xun
 */
@Controller
@RequestMapping("/comment")
public class CommentController {
    @Autowired
    private CommentService commentService;

    @PostMapping("/query")
    @ResponseBody
    public List<CommentDao> queryComment(GoodsRequestDto goodsRequestDto){
        return commentService.queryComment(goodsRequestDto);
    }
}
